﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;

namespace DAO
{
    public class DangNhapDAO
    {

        public static bool KiemTraDangNhap(string tenDangNhap, string maDangNhap)
        { 
            
            string command = "select * from DangNhap"
                            + " where DangNhap.tenTruyCap = '" + tenDangNhap + "'"
                            + " and DangNhap.maDangNhap = '" + maDangNhap + "'";

            DataTable tb = new DataTable();
            try
            {
                tb = DaTaProvider.excecuteQuery(command);
            }
            catch (Exception ex)
            {
                return false;
            }
            if (tb.Rows.Count == 0)
                return false;
            return true;
        }
    }
}
